import request from '@/utils/request'
/**
 *搜索关键词
 * @param {*} keyword 关键词
 * @returns
 */
export const getSuggestion = (keyword) => {
  return request({
    method: 'get',
    url: '/v1_0/suggestion',
    params: {
      q: keyword
    }
  })
}
/**
 *搜索结果
 * @param {*} keyword 搜索关键字
 * @param {*} page 当前页
 * @returns
 */
export const getSearchResult = (keyword, page = 1) => {
  return request({
    method: 'get',
    url: '/v1_0/search',
    params: {
      q: keyword,
      page,
      per_page: 10
    }
  })
}
